package com.privatbank.listener;

/**
 * Created by Slava on 20.07.2014.
 */

import com.privatbank.constants.Constants;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class MyAppServletContextListener implements ServletContextListener {

    public void contextInitialized(ServletContextEvent event) {
        try {
            Class.forName(Constants.DRIVER);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            throw new IllegalStateException("Application is not able to find Sybase JDBC.");
        }
    }

    public void contextDestroyed(ServletContextEvent event) {

    }
}
